﻿<link href="@Url.Content("~/content/activitie_detail.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/content/table_btn.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/content/activitie_noscript.css")" rel="stylesheet" type="text/css"/>

<!--[if lt IE 8]>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
<![endif]-->

@model PessMvc.Models.InputExpertScoreModel

@{
    ViewBag.Title = "录入分数";
}

<h2>录入分数</h2>
<div id="operate">
    @Html.ActionLink("取消","ExpertScores","Score",new {archiveID=Model.ArchiveID},null)
</div>

<fieldset class="show">
    <legend>档案编号：@Model.ArchiveSN</legend>
@using(Html.BeginForm("InputExpertScore","Score",FormMethod.Post)){
    <div>评委：@Html.DropDownList("ExpertSN", Model.ExpertJudges.Select(e=>new SelectListItem() {  Text=e.SerialNumber+"-"+e.RealName, Value=e.SerialNumber}))</div>
    <div class="displayConScroe">
        <table>
            <tr>
                <th>名称</th>
                <th>说明</th>
                <th>分值</th>
                <th></th>
            </tr>
            @{var scores=Model.Scores.ToList();}
            @for (int i = 0; i < scores.Count(); i++)
            {
                <tr>
                    <th>@scores[i].Name</th>
                    <th>@scores[i].Description</th>
                    <th>@scores[i].Value</th>
                    <th>
                        @Html.Hidden("scores["+i+"].RuleID",scores[i].ID)
                        @Html.Hidden("scores["+i+"].ArchiveID",Model.ArchiveID)
                        @Html.TextBox("scores["+i+"].Value", (object)scores[i].ScoreValue == null ? 0 : (decimal)scores[i].ScoreValue ) </th>
                </tr>
            }
        </table>
    </div>
    <input type="submit" value="保存" class="btn" />
}
@using(Html.BeginForm("DeleteExpertScores","Score",FormMethod.Post))
{
    @Html.Hidden("ArchiveID",Model.ArchiveID)
    @Html.Hidden("ExpertSN",Model.ExpertJudges.FirstOrDefault().SerialNumber)
    <input type="submit" value="删除分数" class="btn" />
}
</fieldset>